import request from '@/utils/request'

//新增接口
export const addWcOrder = (data = {}, params = {}) => {
	return request({
		url: 'wcOrder',
		method: 'POST',
		data,
		params
	})
}
//修改接口
export const updataWcOrder = (data = {}, params = {}) => {
	return request({
		url: 'wcOrder',
		method: 'PUT',
		data,
		params
	})
}
//导出接口
export const exportWcOrder = (data = {}, params = {}) => {
	return request({
		url: 'wcOrder/export',
		method: 'POST',
		responseType: "blob",
		data,
		params
	})
}
//查询列表接口
export const listWcOrder = (data = {}, params = {}) => {
	return request({
		url: 'wcOrder/list',
		method: 'GET',
		data,
		params
	})
}
//删除接口
export function deleteWcOrder(ids) {
	return request({
		url: `wcOrder/${ids}`,
		method: 'DELETE'
	})
}
//单查接口
export function findWcOrder(id) {
	return request({
		url: `wcOrder/${id}`,
		method: 'GET'
	})
}
//售后列表查询
export const listWcRefundRequest = (data = {}, params = {}) => {
	return request({
		url: `wcRefundRequest/list`,
		method: 'GET',
		data,
		params
	})
}

//退款审核
export const wcRefundRequestApprove = ({
	id,
	status
}) => {
	return request({
		url: `wcRefundRequest/approve/${id}/${status}`,
		method: 'post'
	})
}
